<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var isPowerOfFour = function(n) {
				if (n <= 0) return false
				if (n == 1) return true
				let i = 1
				while (i < n) {
					let temp = i * 4
					if (temp == n) {
						return true
					} else if (temp > n) {
						return false
					}
					i = temp
				}
			};
			console.log(isPowerOfFour(4));
		</script>
	</body>
</html>
